import 'package:flutter/material.dart';

class ImageCase extends StatelessWidget {
  const ImageCase({super.key});

  @override
  Widget build(BuildContext context) {
    return Container(
      width: 300,
      height: 400,
      decoration:  const BoxDecoration(
        borderRadius: BorderRadius.all(Radius.circular(20)),
        color: Colors.red,

        // image:  DecorationImage(
        //   //使用网络图片
        //   image: NetworkImage(
        //     'https://tse3-mm.cn.bing.net/th/id/OIP-C.EFfnQzEAtcWytl168ENvbAHaHa?w=195&h=195&c=7&r=0&o=5&dpr=1.1&pid=1.7'
        //     ),
        //   fit: BoxFit.cover,
        // ),
      ),
      //裁剪成圆形
      child: const Column(
        children: [
        ClipOval(
        child: Image(
          image: NetworkImage(
            'https://tse3-mm.cn.bing.net/th/id/OIP-C.EFfnQzEAtcWytl168ENvbAHaHa?w=195&h=195&c=7&r=0&o=5&dpr=1.1&pid=1.7'
            ),
            width: 100,
            height: 100,
        ),
      ),
      //圆角图片
      ClipRRect(
        borderRadius: BorderRadius.all(Radius.circular(20)),
        child: Image(
          image: NetworkImage(
            'https://tse3-mm.cn.bing.net/th/id/OIP-C.EFfnQzEAtcWytl168ENvbAHaHa?w=195&h=195&c=7&r=0&o=5&dpr=1.1&pid=1.7'
            ),
            width: 100,
            height: 100,
        ),
      ),
      // 本地图片
      ClipRRect(
        borderRadius: BorderRadius.all(Radius.circular(20)),
        child: Image(
          image: AssetImage(
            'assets/open_eyes.png'
            ),
            width: 100,
            height: 100,
        ),
      ),

      ],
      ),
    );
  }
}